Skip to content

feat(examples): add rsbuild-devframe-hub - #162

Open
antfubot wants to merge 1 commit into
mainfrom
feat/rsbuild-devframe-hub
Open

feat(examples): add rsbuild-devframe-hub#162
antfubot wants to merge 1 commit into
mainfrom
feat/rsbuild-devframe-hub

Conversation

@antfubot

@antfubot antfubot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds examples/rsbuild-devframe-hub — a third reference hub host, alongside the Vite and Next examples. It hosts the @devframes/hub protocol from an Rsbuild (Rspack) dev server with a React browser UI, wearing the same shape as the existing hosts: an icon dock rail, an iframe stage, and a subsystem drawer (commands / messages / terminals).

The host (src/rsbuild-devframe-hub.ts) is a small Rsbuild plugin that registers connect middleware in onBeforeStartDevServer and starts the side-car RPC/WS server. Because rsbuild.config.ts runs in Node — not through Rspack — the built-in plugins are imported directly, exactly like the Vite host, with no bundler-ignored dynamic import() needed.

It mounts the same set the Vite host does end-to-end: git, terminals, code-server, inspect, data-inspector, a11y, messages, og and assets, plus two demo SPAs, a shared-iframe tabbed tool, a server-authored JSON-render dock, and two client-only docks. The a11y agent is served same-origin via DevframeHost.mountStatic (Rsbuild has no Vite /@fs/) and attached as the dock's clientScript. Styling uses @unocss/postcss; the JSON-render dock renders through the mini React registry shared verbatim with the Next hub example.

What's included

  • New example package rsbuild-devframe-hub (host plugin, demo devframes, React client, SPAs, public/ assets)
  • @rsbuild/core + @rsbuild/plugin-react added to the build catalog
  • Docs: examples overview table, sidebar nav item, and a dedicated docs/examples/rsbuild-devframe-hub.md page
  • turbo.json build task (mirroring the Vite host's dependency list) and a knip.jsonc workspace override

Verification

  • pnpm --filter rsbuild-devframe-hub typecheck — passes
  • pnpm knip — passes
  • eslint — passes
  • rsbuild build — compiles the React client (workspace-source aliases + @antfu/design raw TS + @unocss/postcss)
  • rsbuild dev — boots; verified /__hub/__connection.json, mounted SPAs, the same-origin a11y agent module, and instance-registry registration/teardown

This PR was created with the help of an agent.

A third reference hub host built on an Rsbuild (Rspack) dev server with a
React browser UI, wearing the same shape as the Vite and Next hosts: an icon
dock rail, an iframe stage, and a drawer of hub subsystems.

The host is a small Rsbuild plugin that registers connect middleware and starts
the side-car RPC/WS server; because rsbuild.config.ts runs in Node, the built-in
plugins are imported directly like the Vite host. The JSON-render dock renders
through the mini React registry shared verbatim with the Next hub example.
@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit 4b57d6a
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a72cbaf88366a0008170e87
😎 Deploy Preview https://deploy-preview-162--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant